
<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">

    <title>${setting.siteName} - 主页</title>
    <meta name="keywords" content="${setting.siteName}">
    <meta name="description" content="${setting.siteName}">
  	<!-- BEGIN HEADER -->
		[#include "/admin/include/style.ftl"]
	<!-- END HEADER -->
	<style>
		html, body, div, span, input, p,h1, h2, h3, h4, h5, h6, blockquote, a, abbr, acronym, address, strong, b, u, i, center,dl, dt, dd, ol, ul,td,tr {
		    font-family:"Microsoft Yahei","微软雅黑","宋体", "Simsun", "Open Sans";
		}
		.form-control, .single-line {
		    width: 70%;
		    display: inline-block;
		}
		
		select.form-control.form-select {
			display: inline-block;
		    width: 20%;
		}
		.btn {
			margin:0 5px;
		}
	</style>
</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content  animated fadeInRight">

        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                	<form id="listForm" action="list.jhtml" method="get">
                    <div class="ibox-title">
                    	 <h5>意见反馈 </h5>
                    	  <div class="ibox-tools">
                    	  	<a class="btn btn-danger btn-xs btn-mark-loippi-group"><i class="fa fa-trash"></i> 标记为已处理</a>
	                        <a class="btn btn-outline btn-danger btn-xs btn-delete-loippi-group"><i class="fa fa-trash"></i> 删除</a>
	                 </div>
                    </div>
                    <div class="ibox-content">
                    <div class="row">
 					  		<div class="col-sm-3 m-b-xs">
 					  		<label>User ID</label>
					        <input type="text" placeholder="UserID" name="filter_userId" value="${(paramter.userId)!''}" class="input-sm form-control">
                            </div>
					        <div class="col-sm-3 m-b-xs">
					        <label>手机号</label>
					        <input type="text" placeholder="请输入手机号" name="filter_mobile" value="${(paramter.mobile)!''}" class="input-sm form-control">
                            </div>
                            <div class="col-sm-3 m-b-xs">
									<div class="input-group">
										<span class="input-group-addon">反馈时间</span> <input type="text"
											class="form-control input-sm" name="filter_createDates"
											value="${(paramter.createDates)!''}"
											onclick="laydate({istime: false, format: 'YYYY-MM-DD'})"
											placeholder="选择起止时间"> <span
											class="input-group-addon">到</span> <input type="text"
											class="form-control input-sm" name="filter_createDatee"
											value="${(paramter.createDatee)!''}"
											onclick="laydate({istime: false, format: 'YYYY-MM-DD'})"
											placeholder="选择结束时间">
									</div>
								</div>
							</div>
                        
                           <div class="col-sm-4">
                               <div class="input-group">
                                     <button type="button" class="btn btn-sm btn-primary loippi-search-button"> 搜索</button>
                                      <a type="button" class="btn btn-sm btn-info" href="list.jhtml">重置</a>
                               </div>
                           </div>
						   <div class="dataTables_wrapper form-inline">
                            <table class="table table-striped table-bordered table-hover dataTables-example dataTable">
                                <thead>
										<tr>
											<th><input type="checkbox" class="i-checks"
												name="checkAll"></th>
											<th>序号</th>
											<th>User ID</th>
											<th>手机号</th>
											<th>昵称</th>
											<th>反馈内容</th>
											<th>反馈时间</th>
											<th>状态</th>
											<th>处理人账号</th>
											<th>处理时间</th>
											<th>操作</th>
										</tr>
									</thead>
                                <tbody>
										[#list page.content as feedback]
										<tr>
											<td>
												<!--【改示例名称：描述—】--> <input type="checkbox" class="i-checks"
												name="ids" value="${feedback.id}">
											</td>
											<td>${(feedback.id)!''}</td>
											<td>${(feedback.userId)!''}</td>
											<td>${(feedback.mobile)!''}</td>
											<td>${(feedback.userName)!''}</td>
											<td>${(feedback.content)!''}</td>
											<td>${(feedback.createDate?string('yyyy-MM-dd HH:mm'))!''}</td>
											<td>${(feedback.status == 0)?string("待处理","已处理")!''}</td>
											<td>${(feedback.handlerAccount)!''}</td>
											<td>${(feedback.replyTime?string('yyyy-MM-dd HH:mm'))!''}</td>
											<td><a href="${base}/admin/feedback/view/${feedback.id}.jhtml" class="btn btn-xs btn-default">${message("admin.common.view")} </a> 
												[#if feedback.status == 0]
													<a class="btn btn-danger btn-xs btn-mark-loippi" data-id="${feedback.id}"><i class="fa fa-trash"></i>标记为已处理</a>
												[/#if]
												<a class="btn btn-danger btn-xs btn-delete-loippi" data-id="${feedback.id}"><i class="fa fa-trash"></i>${message("admin.common.delete")} </a>
											</td>
										</tr>
										[/#list]
									</tbody>
                            </table>
                       		[@pagination pageNumber = page.pageNumber totalPages = page.totalPages]
								[#include "/admin/include/pagination.ftl"]
							[/@pagination]
                        </div>
                    </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
	
   	
	<!-- BEGIN Script -->
		[#include "/admin/include/script.ftl"]
	<!-- END Script -->
    
    <script>
    
        $(document).ready(function () {
        	[@flash_message /]
             // 标记单条记录
            $(".btn-mark-loippi").click(function(){
            	var $this = $(this);
            	 bootbox.confirm(message("你确定标记为已处理吗？"), function(result) {
				 	if(result){
				 		$.ajax({
							url: "mark_deal.jhtml",
							type: "POST",
							data: {ids:$this.attr('data-id')},
							dataType: "json",
							cache: false,
							success: function(message) {
								window.setTimeout(function() {
										window.location.reload();
									}, 500);
							}
						});
				 	}
                }); 
            });
           
           // 标记多条记录
           $(".btn-mark-loippi-group").click(function(){
           		var $checkeds = jQuery($("input[name='ids']:checked"));
           		
           		if($checkeds.length == 0){art.warn('请选择记录！');return;}
           		
           		bootbox.confirm(message("你确定标记为已处理吗？"), function(result) {
				 	if(result){
				 		$.ajax({
							url: "mark_deal.jhtml",
							type: "POST",
							data: $checkeds.serialize(),
							dataType: "json",
							cache: false,
							success: function(message) {
								art.message(message);
								if (message.type == "success") {
									window.setTimeout(function() {
										window.location.reload(true);
									}, 500);
								}
							}
						});
				 	}
                }); 
           });
        });
        

    </script>
</body>

</html>
